﻿

#region License
/*
 *  Copyright (c) Dumuzi.cn 2009 , All rights reserved.
 *  CLR Version: 2.0.50727.4927
 *  NameSpace: Summer.Core.Ioc
 *  Author:Edwin Tai,戴佳顺
 *  Msn:edwin19861218@hotmail.com
 *  QQ: 1961218
 *  Date:2009-11-06 15:31:48
 *  Licensed under the Microsoft Public License (Ms-PL)
 *  This license governs use of the accompanying software. 
 *  If you use the software, you accept this license.
 *  If you do not accept the license, do not use the software.
 */
#endregion

namespace Summer.Core.Ioc
{
    /// <summary>
    /// The package class of the object in the context
    /// </summary>
    public class ContextObject:IContextObject
    {
        private string m_name;
        private object m_object;
        private bool m_singleton = true;
        private IContextObjectProperty[] m_property;
        private string m_class;
        private string m_ref;

        public ContextObject() { }
 
        #region IExtensionObject<object> 成员

        public bool Load(object additional)
        {
            return true;
        }

        public bool UnLoad()
        {
            return true;
        }

        #endregion

        #region IContextObject 成员

        public string Name
        {
            get
            {
                return m_name;
            }
            set
            {
                m_name = value;
            }
        }

        public  object Object
        {
            get
            {
                return m_object;
            }
            set
            {
                m_object = value;
            }
        }

        public IContextObjectProperty[] Property
        {
            get
            {
                return m_property;
            }
            set
            {
                m_property = value;
            }
        }

        public bool Singleton
        {
            get
            {
                return m_singleton;
            }
            set
            {
                m_singleton = value;
            }
        }

        public string Class
        {
            get
            {
                return m_class;
            }
            set
            {
                m_class = value;
            }
        }

        public string Ref
        {
            get
            {
                return m_ref;
            }
            set
            {
                m_ref = value;
            }
        }

        #endregion
    }
}
